import request from '@/utils/request'

export function showForumSectionList(query) {
  return request({
    url: '/discuss/forum/section/show',
    method: 'get',
    params: query
  })
}

export function showLeagueSectionList(query) {
  return request({
    url: '/discuss/league/section/show',
    method: 'get',
    params: query
  })
}

export function showProSectionList(query) {
  return request({
    url: '/discuss/pro/section/show',
    method: 'get',
    params: query
  })
}

export function deleteForumSection(sectionId) {
  return request({
    url: '/discuss/forum/section/delete',
    method: 'get',
    params: { 'sectionId': sectionId }
  })
}

export function deleteLeagueSection(sectionId) {
  return request({
    url: '/discuss/league/section/delete',
    method: 'get',
    params: { 'sectionId': sectionId }
  })
}

export function deleteProSection(sectionId) {
  return request({
    url: '/discuss/pro/section/delete',
    method: 'get',
    params: { 'sectionId': sectionId }
  })
}

export function saveOrUpdateForumSection(data) {
  return request({
    url: '/discuss/forum/section/save',
    method: 'post',
    data
  })
}

export function saveOrUpdateLeagueSection(data) {
  return request({
    url: '/discuss/league/section/save',
    method: 'post',
    data
  })
}

export function saveOrUpdateProSection(data) {
  return request({
    url: '/discuss/pro/section/save',
    method: 'post',
    data
  })
}

export function getForumSectionList() {
  return request({
    url: '/discuss/forum/section/list',
    method: 'get'
  })
}

export function getLeagueSectionList() {
  return request({
    url: '/discuss/league/section/list',
    method: 'get'
  })
}

export function showForumIssueList(query) {
  return request({
    url: '/discuss/forum/issue/show',
    method: 'get',
    params: query
  })
}

export function showLeagueIssueList(query) {
  return request({
    url: '/discuss/league/issue/show',
    method: 'get',
    params: query
  })
}

export function getIssueDetail(issueId) {
  return request({
    url: '/discuss/issue/detail',
    method: 'get',
    params: { 'issueId': issueId }
  })
}

export function deleteIssue(issueId) {
  return request({
    url: '/discuss/issue/delete',
    method: 'get',
    params: { 'issueId': issueId }
  })
}

export function passIssue(query) {
  return request({
    url: '/discuss/issue/pass',
    method: 'get',
    params: query
  })
}

export function toggleIssueTop(query) {
  return request({
    url: '/discuss/issue/top',
    method: 'get',
    params: query
  })
}

export function showPostList(query) {
  return request({
    url: '/discuss/post/show',
    method: 'get',
    params: query
  })
}

export function deletePost(postId) {
  return request({
    url: '/discuss/post/delete',
    method: 'get',
    params: { 'postId': postId }
  })
}

export function passPost(query) {
  return request({
    url: '/discuss/post/pass',
    method: 'get',
    params: query
  })
}

export function getPostCommentList(query) {
  return request({
    url: '/discuss/comment/list',
    method: 'get',
    params: query
  })
}

export function deleteComment(commentId) {
  return request({
    url: '/discuss/comment/delete',
    method: 'get',
    params: { 'commentId': commentId }
  })
}

export function checkLeagueSection(query) {
  return request({
    url: '/discuss/league/section/check',
    method: 'get',
    params: query
  })
}

export function setLeagueSectionAuthority(query) {
  return request({
    url: '/discuss/league/section/auth',
    method: 'get',
    params: query
  })
}

export function getLeagueNamePatternList() {
  return request({
    url: '/discuss/league/pattern/show',
    method: 'get'
  })
}

export function deleteLeagueNamePattern(patternId) {
  return request({
    url: '/discuss/league/pattern/delete',
    method: 'get',
    params: { patternId }
  })
}

export function addLeagueNamePattern(patternContent) {
  return request({
    url: '/discuss/league/pattern/add',
    method: 'get',
    params: { patternContent }
  })
}

export function showReportList(query) {
  return request({
    url: '/report/show',
    method: 'get',
    params: query
  })
}

export function handleReport(params) {
  return request({
    url: '/report/handle',
    method: 'get',
    params
  })
}

export function deleteReport(reportId) {
  return request({
    url: '/report/remove',
    method: 'get',
    params: { reportId }
  })
}

export function getReportContent(reportType, businessId) {
  return request({
    url: '/report/content',
    method: 'get',
    params: { reportType, businessId }
  })
}
